
<script setup lang="ts">
import { useAnimation } from "./useAnimation";

const { isAnimating, startAnimation };
</script>


<template>
  <div :class="{animated:isAnimating}" @click="startAnimation">
    Animate
  </div>
</template>



<style>
.animated {
  animation: fade 1s;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
</style>
